home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 with MFC / Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso / CODE / Chap03 / GdiDemo4 / GdiDemo4.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-05  |  1006 b   |  52 lines

  1. //***********************************************************************
  2. //
  3. //  GdiDemo4.h
  4. //
  5. //***********************************************************************
  6.  
  7. class CMyApp : public CWinApp
  8. {
  9. public:
  10.     virtual BOOL InitInstance ();
  11. };
  12.  
  13. class CMyView : public CScrollView
  14. {
  15. private:
  16.     int m_cxChar;
  17.     int m_cyChar;
  18.  
  19.     void ShowPenStyles (CDC*, int, int);
  20.     void ShowPenWidths (CDC*, int, int);
  21.     void ShowBrushStyles (CDC*, int, int);
  22.  
  23. protected:
  24.     virtual void OnDraw (CDC*);
  25.  
  26.     afx_msg int OnCreate (LPCREATESTRUCT);
  27.     afx_msg void OnSize (UINT, int, int);
  28.     afx_msg void OnKeyDown (UINT, UINT, UINT);
  29.  
  30.     DECLARE_MESSAGE_MAP ()
  31. };
  32.  
  33. class CMainWindow : public CFrameWnd
  34. {
  35. private:
  36.     CMyView* m_pMyView;
  37.  
  38. public:
  39.     CMainWindow ();
  40.  
  41. protected:
  42.     afx_msg int OnCreate (LPCREATESTRUCT);
  43.     afx_msg void OnSetFocus (CWnd*);
  44.     
  45.     DECLARE_MESSAGE_MAP ()
  46. };
  47.  
  48. struct STYLES {
  49.     int nStyle;
  50.     char szStyleName[16];
  51. };
  52.